Introduction to IoT board, ESP8266
Getting to know something new, actually its not new, for some people actually its a new toy including me :D, somehow getting me excited. I just found that ESP 8266 can be configured from the inside. I’ve used once an ESP 8266 as wireless communication device in a project, but using its default Flash.bin file. but that time, i still don’t know if its an “open source”. After some investigation, an ESP 8266 can be configured into small interpreter, such micropython. well, there also extension board on Arduino IDE that can be downloaded, attached to the IDE, in order to run the ESP board.
I actually, not really impressed, I mean everything going to Arduino, then it getting easy anyway. Well, not mean to underestimating the programming in arduino IDE, but when programming going to be easy executed, its not challenging. So I choose Micropython to run the board. Well, I know some people will say it’s easy also. :))
So lets get started. The things we need to do is grab the board, plug the USB cable, connect it into computer, download the USB driver, and oh, Btw I use NodeMCU board to run micropython here. You can read more tutorial from this page
https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html
it has complete explanation about the Micropython, how it works and how to use it. OK, let me make it short. download the latest firmware here http://micropython.org/download#esp8266 , then install esptool script to your installed python on your computer. if this your first time using python, you need to configure path to python script. then you can start it.
>> pip3 install esptool #if you use python 3 above
after its installed, then start the esptool
>> esptool.py –port /dev/ttyUSB0 erase_flash
after the flash is erased, it needs to be reflashed. then..
>> esptool.py –port COM6 –baud 460800 write_flash –flash_size=detect 0 esp8266-20170108-v1.8.7.bin
you need to change the com port to the board port, check your device manager. then done :). Then open terminal, in this case I use Coolterm.
Setting Coolterm to COM6, Baudrate 115200, then connect. and. Abrakadabra!!!!. Nothing happend. WOW.
actually this drives me frustated. I’ve followed the instructions, from the beginning, long read and bugs occured!!. What a wasted effort.
OK, let’s start from flashing the .bin file. its not properly flashed. here is the way:
esptool.py –port COM6 –baud 115200 write_flash –verify –flash_size=detect -fm dout 0 file.bin
here is the key -fm dout 0. then reflash it again. done. open the Cool term with previous configuration. connect it to your board. when it’s connected, PRESS ENTER!!. and BAM !!. here it is, micropython on your ESP 8266. Done
then, Happy Coding.
Till next post 🙂
Recent Comments